package com.kevin.ejb3;

import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Stateless;

/**
 * Created by loli on 2015/3/15.
 */
@Remote({Injection.class})
@Stateless
public class InjectionBean implements Injection{
    @EJB(mappedName = "HelloWorldBean/remote")
    HelloWorld helloWorld;

    @Resource(mappedName = "HelloWorldBean/remote")
    HelloWorld helloWorld2;

    public String SayHello(){
        helloWorld.sayHello("injection");
        helloWorld2.sayHello("injection");
        return "Injection";
    }
}
